dofile ("libCheckBox.lua")

checkbox1 = CheckBox.new(SCREEN_DOWN, 5, 5, "CheckBox 1", 'fillInBox', Color.new(31, 0, 0))
checkbox2 = CheckBox.new(SCREEN_DOWN, 5, 25, "CheckBox 2", 'crossInBox')
checkbox3 = CheckBox.new(SCREEN_DOWN, 5, 45, "CheckBox 3", 'vInBox', Color.new(0, 31, 31))
checkbox4 = CheckBox.new(SCREEN_DOWN, 5, 65, "CheckBox 4", 'crossInBox', Color.new(31, 16, 0))

while not Keys.newPress.Start do
   
  Controls.read()
  
  startDrawing()
    
    checkbox1:draw()
    checkbox2:draw()
    checkbox3:draw()
    checkbox4:draw()
    
    if checkbox1:isChecked() then
      screen.print (SCREEN_UP, 5, 5, "CheckBox 1 checked")
    end
    if checkbox2:isChecked() then
      screen.print (SCREEN_UP, 5, 25, "CheckBox 2 checked")
    end
    if checkbox3:isChecked() then
      screen.print (SCREEN_UP, 5, 45, "CheckBox 3 checked")
    end
    if checkbox4:isChecked() then
      screen.print (SCREEN_UP, 5, 65, "CheckBox 4 checked")
    end
    
  stopDrawing()

end

checkbox1:clear()
checkbox2:clear()
checkbox3:clear()
checkbox4:clear()
